import Vue from 'vue'
import Router from 'vue-router'
import VueIndex from "../components/VueIndex";
import Users from "../components/user/Users";
import UserAdd from "../components/user/UserAdd";
import UserEdit from "../components/user/UserEdit";
import Order from "../components/order/Order";
import Message from "../components/message/Message";

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/vueIndex'},
    {path: '/vueIndex', name: 'VueIndex', component: VueIndex},
    {path: '/userEdit', name: 'UserEdit', component: UserEdit},
    {path: '/order', name: 'Order', component: Order},
    {path: '/message', name: 'Message', component: Message},
    {
      path: '/users', name: 'Users', component: Users,
      children:[
        {path:'add',name:'UserAdd',component:UserAdd},
    ]},

  ]
})
